﻿using ReactiveUI;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfMqttAnalyzeApp.Model
{
    public class TopicTreeListener : ReactiveObject
    {
        public bool IsLeaf { get; set; }

        private string _nodeName;
        public string NodeName
        {
            get => _nodeName;
            set
            {
                this.RaiseAndSetIfChanged(ref _nodeName, value);
            }
        }

        public string Topic { get; set; }

        private bool _isSelected;
        public bool IsSelected
        {
            get => _isSelected;
            set
            {
                this.RaiseAndSetIfChanged(ref _isSelected, value);
            }
        }

        private bool _isExpanded;
        public bool IsExpanded
        {
            get => _isExpanded;
            set
            {
                this.RaiseAndSetIfChanged(ref _isExpanded, value);
            }
        }

        private int _totalNum;
        public int TotalNum
        {
            get => _totalNum;
            set
            {
                this.RaiseAndSetIfChanged(ref _totalNum, value);
            }
        }

        public ObservableCollection<TopicTreeListener> SubClass {  get; set; }
    }

    public class MqttContentClassify
    {
        public string ClassGuid { get; set; }
        public string ClassName { get; set; }

        public int TotalNum { get; set; }
    }
}
